﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace GameCore{
	public static class UnityExt
	{
        public static T AddMissingComponent<T>(this GameObject gameObj)where T :Component{
            T t = gameObj.GetComponent<T>();
            if (t == null) t = gameObj.AddComponent<T>();
            return t;
        }
	}
}

